import { get } from "vant/lib/utils";
import api from "./api";
import { Get, Post } from "./axios";
//发送具体的请求需要单独放入js文件
export function getBanners(callback) {
  Get(api.getBanner, callback);
}
export function getAllProType(callback) {
  Get(api.getAllProType, callback);
}
export function getDetail(data, callback) {
  Get(`${api.getDetail}?id=${data.id}`, callback);
}
export function login(data, callback) {
  Post(api.login, data, callback);
}
export function register(data, callback) {
  Post(api.register, data, callback);
}
export function profile(callback) {
  Get(api.profile, callback);
}
export function adddetailimg(data, callback) {
  Post(api.adddetailimg, data, callback);
}
export function deldetailimg(data, callback) {
  Post(api.deldetailimg, data, callback);
}
export function updateavatar(data, callback) {
  Post(api.updateavatar, data, callback);
}
export function updateProfile(data, callback) {
  Post(api.updateProfile, data, callback);
}
export function createOrder(data, callback) {
  Post(api.createOrder, data, callback);
}
export function saveMoney(data, callback) {
  Post(api.saveMoney, data, callback);
}
export function payOrder(data, callback) {
  Post(api.payOrder, data, callback);
}
export function getOrdersList(data, callback) {
  Post(api.getOrdersList, data, callback);
}
export function getOrders(data, callback) {
  Post(api.getOrders, data, callback);
}
export function delOrder(data, callback) {
  Get(`${api.delOrder}?orderId=${data.orderId}`, callback);
}
export function updateOrders(data, callback) {
  Post(api.updateOrders, data, callback);
}
export function confirmOrder(data, callback) {
  Get(`${api.confirmOrder}?orderid=${data.orderid}`, callback);
}
export function saveArticle(data, callback) {
  Post(api.saveArticle, data, callback);
}
export function updateOrderProlist(data, callback) {
  Post(api.updateOrderProlist, data, callback);
}
export function getArticle(data, callback) {
  Get(`${api.getArticle}?proid=${data.proid}&&page=${data.page}`, callback);
}
export function updatePopular(data, callback) {
  Get(`${api.updatePopular}?id=${data.id}`, callback);
}
